import api from '@/libs/request'

/**
 * 商家信息获取
 * @param data
 */
export const getshopinfo = () => {
    return api.get('/gruul-mall-shop/shop/info')
}
//定义商铺数据
export interface dataType {
    id: string
    createTime: string
    updateTime: string
    version: number
    deleted: boolean
    companyName: string
    name: string
    userId: string
    no: string
    contractNumber: string
    status: string
    address: string
    location: {
        type: string
        coordinates: Array<number>
    }
    logo: string
    briefing: string
    headBackground: string
    start: string
    end: string
    newTips: string
}
/**
 * 商家设置信息获取
 * @param data
 */
export const getsettings = (data: any) => {
    return api.get('/gruul-mall-shop/shop/info', data)
}
/**
 * 商家设置信息修改
 * @param data
 */
export const postsettings = (data: any) => {
    return api.post('/gruul-mall-shop/shop/info/update', data)
}
/**
 * 店铺交易信息获取
 * @param data
 */
export const gettrade = (data: any) => {
    return api.get('/gruul-mall-order/order/config/form', data)
}

/**
 * 商铺交易信息编辑
 * @param data
 */
export const posttrade = (data: any) => {
    return api.post('/gruul-mall-order/order/config/form', data)
}
